package us.versus.them.triangle_mountain;

import opengl.GLU;
import opengl.GL;

class Camera {
/*
	var eye    : Pt3;
	var center : Pt3;
	var up     : Pt3;
*/
	public var rotation : Pt3;
	public var position: Pt3;

	public function new() {
		this.reset();
	}

	public function reset() {
/*
		this.eye    = new Pt3( 0.0, 0.0, 5.0 );
		this.up     = new Pt3( 0.0, 1.0, 0.0 );
		this.center = new Pt3();
*/
		this.rotation = new Pt3();
		this.position = new Pt3();
	}

	public function look() {
/*
		GLU.lookAt(
			eye.x, eye.y, eye.z,
			this.center.x, this.center.y, this.center.z,
			this.up.x, this.up.y, this.up.z
		);
*/
        GLU.lookAt(
			0, 0, 5,
			0, 0, 0,
			0, 1, 0
		);

		// draw dude here
		// .

		GL.translate( -this.position.x, -this.position.y, -this.position.z );
		GL.rotate( this.rotation.x, 1.0, 0.0, 0.0 );
		GL.rotate( this.rotation.y, 0.0, 1.0, 0.0 );
		GL.rotate( this.rotation.z, 0.0, 0.0, 1.0 );
	}
}
